(ido-make-merged-file-list): Move fully matching item to head of list.
authorKim F. Storm <storm@cua.dk>
Mon, 8 Jul 2002 22:20:31 +0000 (22:20 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 8 Jul 2002 22:20:31 +0000 (22:20 +0000)
lisp/ido.el

index 97aa0d24a094ef148b75c2bacf90e88dbabe9542..049ef96cb08baba2dfce1d3ea434edb08cb46bb3 100644 (file)
@@ -2511,6 +2511,12 @@ for first matching file."
                      res t))))))
     (if (and res (not (eq res t)))
        (setq res (ido-sort-merged-list res auto)))
+    (when (and (or ido-rotate-temp ido-rotate-file-list-default)
+              (> (length text) 0))
+      (let ((elt (assoc text res)))
+       (unless (eq elt (car res))
+         (setq res (delq elt res))
+         (setq res (cons elt res)))))
     (message nil)
     res))